/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package struts.action;

import struts.form.DeleteFeedForm;
import dao.DAOFeed;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import negocio.Feed;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

public class DeleteFeedAction extends org.apache.struts.action.Action{
    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {

         DeleteFeedForm feedForm = (DeleteFeedForm) form;
        int id = feedForm.getId();

        DAOFeed.delete(id);
        return mapping.findForward("successDeleteFeed");
    }

}
